import request from '@/utils/request'

export function getInfor(query) {
  return request({
    url: '/needchange/query',
    method: 'get',
    params: query
  })
}

export function add(data) {
  return request({
    url: '/needchange',
    method: 'put',
    data
  })
}
export function uploadFile(id, data) {
  return request({
    url: `/needchange/uploadFile/${id}`,
    method: 'post',
    data
  })
}
export function getFile(id) {
  return request({
    url: `/needchange/file/${id}`,
    method: 'get'

  })
}
export function download(id) {
  return request({
    url: `/needchange/downloadFile/${id}`,
    method: 'get',
    responseType: 'arraybuffer'
  })
}
export function delfile(id) {
  return request({
    url: `/needchange/uploadFile/cancel/${id}`,
    method: 'delete'
  })
}
export function send(data) {
  return request({
    url: `/needchange/chat`,
    method: 'post',
    data: data
  })
}
export function getchart(id) {
  return request({
    url: `/needchange/bbs/${id}`,
    method: 'get'

  })
}

export function addSinle(data) {
  return request({
    url: '/needchange/add/checker',
    method: 'post',
    data
  })
}

export function check(data) {
  return request({
    url: `/sysfunction/check/FunctionCheckUser/check/`,
    method: 'put',
    data
  })
}
export function getcheck(query) {
  return request({
    url: '/sysfunction/check/getFunctionCheckUserList/',
    method: 'get',
    params: query
  })
}

